package com.hframe.plugin.wechat;

import com.hframe.Json.JsonFiletr;
import com.hframe.type.*;
import com.hframe.typefilter.NameToEnum;
import org.apache.log4j.Logger;

/**
 * 用户基本信息
 * Created by heqian on 17-9-19.
 */
public class DUserInfo extends DResult {
    private static Logger log = Logger.getLogger(DUserInfo.class);

    public TInt subscribe = new TInt();
    public TString openid = new TString();
    public TString nickname = new TString();
    public TEnum<EnumSex> sex = new TEnum<>(EnumSex.class);
    public TEnum<EnumLanguage> language = new TEnum<>(EnumLanguage.class);
    public TString city = new TString();
    public TString province = new TString();
    public TString country = new TString();
    public TString headimgurl = new TString();
    public TLong subscribe_time = new TLong();
    public TString unionid = new TString();
    public TString remark = new TString();
    public TLong groupid = new TLong();
    public TArray<TInt> tagid_list = new TArray<>(TInt.class);

    public DUserInfo() {
        try {
            language.filter(JsonFiletr.class).setSetCall(new NameToEnum(EnumLanguage.class));
        } catch (Exception e) {
            log.error(e, e);
        }
    }
}